package contegor.scire.core;

import java.util.Collection;

/**
 * Interface for {@link Task}s that are subsequent of an other, as defined by {@link WithSubsequentTasks}, and need
 * its result.
 *
 * @version $Revision$
 * @author  Héctor Cirbián Pousa ($Author$)
 */
@Version("@(#) $Id$")
public interface NeedsPrecedent<I,O> extends Task<O> {

  /**
   * <b>Internal use only method. Don't call it directly.</b>
   * Sets this precedent {@link Task} and its results. All this results must belong to the same {@link Container}.
   * This {@link NeedsPrecedent} {@link Task} will use it as its target {@link Container}.
   */
  public void setPrecedent(Task<? extends I> task, Collection<? extends I> results);
}